import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';

import {CookieModule} from 'ngx-cookie';
import {AuthGuard} from './auth_guard';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {HeaderComponent} from './header/header.component';
import {FooterComponent} from './footer/footer.component';
import {RightComponent} from './right/right.component';
import {IndexComponent} from './index/index.component';
import {HttpClientModule} from '@angular/common/http';
import {FormsModule} from '@angular/forms';
import {UserIndexComponent} from './user/user-index/user-index.component';
import {LoginComponent} from './user/login/login.component';
import {RegisterComponent} from './user/register/register.component';
import {CommentComponent} from './comment/comment.component';
import {LazyLoadImageModule, intersectionObserverPreset} from 'ng-lazyload-image';
import {ListComponent} from './list/list.component';
import {DetailComponent} from './detail/detail.component';
import {PlayComponent} from './play/play.component';
import { PaginatorComponent } from './paginator/paginator.component';


@NgModule({
    declarations: [
        AppComponent,
        HeaderComponent,
        FooterComponent,
        IndexComponent,
        UserIndexComponent,
        LoginComponent,
        RegisterComponent,
        CommentComponent,
        RightComponent,
        ListComponent,
        DetailComponent,
        PlayComponent,
        PaginatorComponent,
    ],
    imports: [
        BrowserModule,
        CookieModule.forRoot(),
        LazyLoadImageModule.forRoot({
            preset: intersectionObserverPreset
        }),
        AppRoutingModule,
        HttpClientModule,
        FormsModule,
    ],
    providers: [AuthGuard],
    exports: [
        HeaderComponent,
        FooterComponent,
        CommentComponent
    ],
    bootstrap: [AppComponent]
})
export class AppModule {
}
